home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / cnet / FPDIZ10.lha / PFiles / FPDIZ / Loaders / .product-info < prev    next >
Text File  |  1995-03-14  |  1KB  |  50 lines

  1. /**/
  2. options results;parse arg ar1'|'ar2;call pragma('P',-5)
  3.  
  4. /* == Place your code here! "AR1" is the path/file, "AR2" is the temp file == */
  5.  
  6. /*              Product-Info Loader Module - Made for FPDiz
  7.  
  8.                                     V1.01
  9.  
  10.      If you find any bugs in this please report them to mUb@912:1000/0.0,
  11.                Chris Brundell@2:2502/12.0 or mub@reliant.psu.edu             */
  12.  
  13. call open(pifile,ar1,R)
  14. piname=''
  15. piver=''
  16. piauth=''
  17. pidate=''
  18. do until eof(pifile)
  19.     piinfo=strip(readln(pifile))
  20.     if piinfo~='' then do
  21.         Select
  22.             when upper(piinfo)='.DATE' then pidate=' - 'strip(readln(pifile))
  23.             when upper(piinfo)='.NAME' then piname=strip(readln(pifile))
  24.             when upper(piinfo)='.VERSION' then pivers=' v'strip(readln(pifile))
  25.             when upper(piinfo)='.AUTHOR' then piauth=' by 'strip(readln(pifile))
  26.             otherwise nop
  27.             end
  28.         end
  29.     end
  30. call close(pifile)
  31. call open(pifile,ar1,R)
  32. do until eof(pifile)
  33.     piinfo=strip(readln(pifile))
  34.     if upper(piinfo)='.DESCRIPTION' then do
  35.         pii=strip(readln(pifile))
  36.         pidesc=' - '
  37.         do until left(pii,1)='.'
  38.             pidesc=pidesc' 'pii
  39.             pii=strip(readln(pifile))
  40.             end
  41.         end
  42.     end
  43. call close(pifile)
  44. desc=piname||pivers||piauth||pidate||pidesc
  45.  
  46. /* ============== Writes the "DESC" variable to the temp file. ============== */
  47.  
  48. call open(fp,ar2,'W');call writeln(fp,desc);call close(fp)
  49. exit
  50.